package com.earl.eatbao.dao.eatbao;

import java.util.List;

import com.earl.eatbao.commons.dao.BaseRepsitoty;
import com.earl.eatbao.domain.eatbao.Goods;

/**
 * 商品仓储
 * @author Administrator
 * @version 1.0
 * @created 23-十一月-2016 17:03:27
 */
public interface GoodsDao extends BaseRepsitoty<Goods,Long> {

    /**
     * 查询所用上下架的商品状态
     * @param status
     * @return
     */
    List<Goods> findByStatus(int status);

    /**
     * 查询所用未被浏览审核的上架商品
     * @param watch
     * @return
     */
    List<Goods> findByWatch(Boolean watch);

    /**
     * 查询商店的所有商品
     * @param shopId
     * @return
     */
	List<Goods> findByShopIdAndPassTrueAndIsDeleteFalse(Long shopId);

	/**
	 * 查询商家未审核商品
	 * @param shopId
	 * @return
	 */
	List<Goods> findByShopIdAndWatchFalseAndIsDeleteFalse(Long shopId);

	List<Goods> findByShopIdAndStatusAndPassTrueAndIsDeleteFalse(Long shopId, int i);
}